<html>
<head><meta charset="utf-8"><title>reducer ICE-breakers · t-compiler/wg-meta · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/index.html">t-compiler/wg-meta</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html">reducer ICE-breakers</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="180740395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180740395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180740395">(Nov 14 2019 at 15:22)</a>:</h4>
<p>The other idea we had was to have a ICE-breaker around bisecting and reducing -- we need a good name for this -- but I definitely think we should do it. Leaving a thread here.</p>



<a name="180740403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180740403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180740403">(Nov 14 2019 at 15:22)</a>:</h4>
<p>We did have an issue on it, I think</p>



<a name="180762265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180762265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180762265">(Nov 14 2019 at 19:03)</a>:</h4>
<p>boy I <em>really</em> better finish writing the blog post I started drafting on this subject (on reducing in particular)</p>



<a name="180762739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180762739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180762739">(Nov 14 2019 at 19:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> btw, what would the bisecting and reducing wg would be about exactly?</p>



<a name="180762802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180762802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180762802">(Nov 14 2019 at 19:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> sometimes we have a bug report</p>



<a name="180762810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180762810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180762810">(Nov 14 2019 at 19:08)</a>:</h4>
<p>that is like "something crashed in my repo"</p>



<a name="180762827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180762827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180762827">(Nov 14 2019 at 19:08)</a>:</h4>
<p>the idea would be to have people who just try to turn that from "something crashed" to</p>



<a name="180762851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180762851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180762851">(Nov 14 2019 at 19:08)</a>:</h4>
<p>"here is a self-contained playground example that broke because of PR <a href="https://github.com/rust-lang/rust/issues/123" target="_blank" title="https://github.com/rust-lang/rust/issues/123">#123</a>"</p>



<a name="180762951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180762951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180762951">(Nov 14 2019 at 19:09)</a>:</h4>
<p>I see</p>



<a name="180763039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180763039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180763039">(Nov 14 2019 at 19:10)</a>:</h4>
<p>So I think an alternative could be to try and have a dedicated set of people (sort of like a standard working group) oriented around this thing, but I think I'd sort of prefer the "just ping a bunch of people and at least one or two of them get interested" and see if it works</p>



<a name="180763301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180763301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180763301">(Nov 14 2019 at 19:12)</a>:</h4>
<p>yeah makes sense</p>



<a name="180763774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180763774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180763774">(Nov 14 2019 at 19:16)</a>:</h4>
<p>Do they give access to their repos?  If they're saying that something crashed <em>and nothing else</em>, then things will be... difficult.</p>



<a name="180764068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764068">(Nov 14 2019 at 19:19)</a>:</h4>
<p>we tend to ask for the source crate and the build/test invocation</p>



<a name="180764125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764125">(Nov 14 2019 at 19:20)</a>:</h4>
<p>(at the very least)</p>



<a name="180764350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764350">(Nov 14 2019 at 19:22)</a>:</h4>
<p>OK, please forgive my ignorance, but would it be possible to script <code>git bisect</code> to do most of this work for you?  Or is the goal to <em>really</em> minimize the output of <code>git bisect</code>?</p>



<a name="180764448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764448">(Nov 14 2019 at 19:23)</a>:</h4>
<p>(as an example, i spent a while today hunting for some way to reproduce <a href="https://github.com/rust-lang/rust/issues/65774" target="_blank" title="https://github.com/rust-lang/rust/issues/65774">#65774</a>, before giving up and closing the bug)</p>



<a name="180764589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764589">(Nov 14 2019 at 19:24)</a>:</h4>
<p><span class="user-mention" data-user-id="202560">@Cem Karan</span> oh, hold on: I think <span class="user-mention" data-user-id="116009">@nikomatsakis</span> failed to provide context about what we are reducing and bisecting-over</p>



<a name="180764636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764636">(Nov 14 2019 at 19:24)</a>:</h4>
<p>The "reduction" under discussion here is not the git history (which is what <code>git bisect</code> attacks)</p>



<a name="180764672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764672">(Nov 14 2019 at 19:25)</a>:</h4>
<p>the reduction is instead of the input source crate (or crates)</p>



<a name="180764699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764699">(Nov 14 2019 at 19:25)</a>:</h4>
<p>and likewise the bisection is over that source code</p>



<a name="180764796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180764796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180764796">(Nov 14 2019 at 19:26)</a>:</h4>
<p>to try to reduce the source code to some minimal amount where the problem of interest still arises</p>



<a name="180765133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180765133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180765133">(Nov 14 2019 at 19:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> OK, thanks for the explanation, but if the crate or crates are also under <code>git</code>, then could we do <code>git bisect</code> on those crates to at least get a clue as to what chunk of code is causing the issue?  I know it isn't ideal as different people have different qualities of committing, but it will pare down the amount of code that needs to be reviewed.  Once that's done, then you can go in by hand to find the real problem area.</p>
<p>Or am I still missing the point???</p>



<a name="180765250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180765250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180765250">(Nov 14 2019 at 19:30)</a>:</h4>
<p>yes, that is also a technique for identifying smoking guns</p>



<a name="180765326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180765326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180765326">(Nov 14 2019 at 19:31)</a>:</h4>
<p>one that we are familiar with; after all, we use it ourself (for <code>cargo-bisect-rustc</code>)</p>



<a name="180765374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180765374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180765374">(Nov 14 2019 at 19:31)</a>:</h4>
<p>And its not unreasonable to include it under the techniques available for trying to identify the problem area</p>



<a name="180765690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180765690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180765690">(Nov 14 2019 at 19:34)</a>:</h4>
<p>But even with that identified git commit in hand, the <code>rustc</code> developers will <strong>still</strong> ask you to provide a <a href="https://stackoverflow.com/help/minimal-reproducible-example" target="_blank" title="https://stackoverflow.com/help/minimal-reproducible-example">mcve</a></p>



<a name="180765937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180765937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180765937">(Nov 14 2019 at 19:36)</a>:</h4>
<p>and of course, while the diff from a single commit may be small, that diff is usually <em>not</em> sufficient the bug report. So you'd still need to figure out how best to reduce the original test (either by building up a new example from scratch, informed by the identified commit; or by reducing down the original crate source)</p>



<a name="180766014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180766014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180766014">(Nov 14 2019 at 19:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span> I should have realized that you guys would already have thought of that!</p>



<a name="180766090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180766090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180766090">(Nov 14 2019 at 19:37)</a>:</h4>
<p>Note that <code>cargo-bisect-rustc</code> is tailored solely for bisecting the <code>rustc</code> development history, not arbitrary crates. <span aria-label="smiley" class="emoji emoji-1f603" role="img" title="smiley">:smiley:</span></p>



<a name="180766538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180766538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180766538">(Nov 14 2019 at 19:42)</a>:</h4>
<p>Yes, and I just thought of something else; the rust project has done a really, really good job of trying to ensure that PRs will always compile at the very least before they are accepted.  Random crates out the wild may not be that clean, so <code>git bisect</code> might not even be a good option.</p>



<a name="180766686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180766686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180766686">(Nov 14 2019 at 19:43)</a>:</h4>
<p>OK, this is a wild spitballing type of idea, which is likely to be difficult to do, but...</p>



<a name="180766960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180766960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180766960">(Nov 14 2019 at 19:45)</a>:</h4>
<p>Since <code>rustc</code> has access to the complete AST, is it possible to selectively delete portions of the tree?  If the crate compiles and the problem still exists, repeat the process, otherwise back out what you did, and try to delete a different portion.  Over time, you'll have a minimal code base that you can test.</p>
<p>I'll be the first to admit that it would be difficult to implement, but it might be a starting point for a better idea...</p>



<a name="180767063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767063">(Nov 14 2019 at 19:46)</a>:</h4>
<p>no its not a bad idea at all. The blog post I'm in the process of authoring describes a set of transformations similar to that (though not always deleting)</p>



<a name="180767086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767086">(Nov 14 2019 at 19:46)</a>:</h4>
<p>for example, replacing function bodies with <code>loop { }</code> is almost always "valid"</p>



<a name="180767134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767134">(Nov 14 2019 at 19:47)</a>:</h4>
<p>so I indeed have often mused about trying to implement a tool that mechanizes the search over these reducing transformations</p>



<a name="180767146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767146">(Nov 14 2019 at 19:47)</a>:</h4>
<p>or leveraging something like quickcheck to do the search</p>



<a name="180767176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767176">(Nov 14 2019 at 19:47)</a>:</h4>
<p>quickcheck/proptest would be a good way to go...</p>



<a name="180767180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767180">(Nov 14 2019 at 19:47)</a>:</h4>
<p>but I wanted to first <em>document</em> the transformations I find useful for reducing by hand</p>



<a name="180767256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767256">(Nov 14 2019 at 19:48)</a>:</h4>
<p>and let some one else worry about implementing the reduction tool</p>



<a name="180767467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767467">(Nov 14 2019 at 19:50)</a>:</h4>
<p>What about using <code>unimplemented!()</code> instead of <code>loop {}</code>?  If a function with <code>loop{}</code> is called, the program will just hang, which may make finding the bug harder.  </p>
<p>Alternatively, if the function's return value implements <code>Default</code>, you might just replace the function body with <code>Default::default()</code>, which should always produce a valid, if unexpected, value.</p>



<a name="180767484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767484">(Nov 14 2019 at 19:50)</a>:</h4>
<blockquote>
<p>for example, replacing function bodies with <code>loop { }</code> is almost always "valid"</p>
</blockquote>
<p>(when one is debugging ICE's, that is)</p>



<a name="180767505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767505">(Nov 14 2019 at 19:50)</a>:</h4>
<p>sorry, I forgot to include that detail before</p>



<a name="180767527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767527">(Nov 14 2019 at 19:51)</a>:</h4>
<p>A <em>lot</em> of the bugs we are trying to reduce are solely compile-time issues</p>



<a name="180767551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767551">(Nov 14 2019 at 19:51)</a>:</h4>
<p>and so the runtime behavior is irrelevant and can be discarded entirely</p>



<a name="180767597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767597">(Nov 14 2019 at 19:51)</a>:</h4>
<p>OK, then you're right, it doesn't matter what goes in the function body.</p>



<a name="180767663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767663">(Nov 14 2019 at 19:52)</a>:</h4>
<p>Actually... what about procedural macros?</p>



<a name="180767726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767726">(Nov 14 2019 at 19:53)</a>:</h4>
<p>well the behavior of <em>those</em> may or may not need to be preserved, depending on the bug</p>



<a name="180767780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767780">(Nov 14 2019 at 19:53)</a>:</h4>
<p>so I'm not really talking about <em>blindly</em> replacing <em>all</em> method bodies and throwing up your hands if things go awry afterwards</p>



<a name="180767953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180767953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180767953">(Nov 14 2019 at 19:55)</a>:</h4>
<p>(you cannot do such blind replacement anyway. Reason 1: you may need one or more bodies to reproduce the bug. Especially if <code>impl Trait</code> in return position is involved. Reason 2: <code>const fn</code> does not support <code>loop { }</code> as  body.)</p>



<a name="180768207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180768207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180768207">(Nov 14 2019 at 19:57)</a>:</h4>
<blockquote>
<p>so I'm not really talking about <em>blindly</em> replacing <em>all</em> method bodies and throwing up your hands if things go awry afterwards</p>
</blockquote>
<p>Makes sense; so what you need to do is figure out what can be replaced, and what you can replace it with.</p>
<blockquote>
<p>(you cannot do such blind replacement anyway. Reason 1: you may need one or more bodies to reproduce the bug. Especially if <code>impl Trait</code> in return position is involved. Reason 2: <code>const fn</code> does not support <code>loop { }</code> as  body.)</p>
</blockquote>
<p>Does <code>const fn</code> support <code>unimplemented!()</code>?</p>



<a name="180768328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180768328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180768328">(Nov 14 2019 at 19:58)</a>:</h4>
<p>Can't help with reason 1</p>



<a name="180768789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180768789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cem Karan <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180768789">(Nov 14 2019 at 20:03)</a>:</h4>
<p>As for not blindly replacing method bodies, let's take a look at that.  One method of solving this problem is to do <em>exactly</em> that, randomly replacing method bodies and recompiling.  One of two things will happen; either the compile will fail, or it will succeed.  If it fails, then back out the changes, if it succeeds, then keep the body swap.  This can continue until you have some minimal set of methods that you can't replace any more.  At that point, you can start deleting methods/functions that have had their bodies replaced.  This will further reduce the code.  It may be enough to get to the root of the bug, or it may not, no way to know without trying.</p>



<a name="180778909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180778909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180778909">(Nov 14 2019 at 21:49)</a>:</h4>
<p>I think we are in vigorous agreement?</p>



<a name="180779615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180779615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180779615">(Nov 14 2019 at 21:55)</a>:</h4>
<p>By the way, a reason I choose to use <code>loop { }</code> rather than <code>unimplemented!()</code> is that it removes the dependence on that <code>unimplemented!()</code> macro (and the underlying panic machinery).</p>



<a name="180779633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180779633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180779633">(Nov 14 2019 at 21:56)</a>:</h4>
<p>For many bugs, this distinction doesn't matter.</p>



<a name="180779799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180779799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180779799">(Nov 14 2019 at 21:57)</a>:</h4>
<p>But there are some bugs where you are working in a  <code>#![no_core]</code> scenario, and you do not have that macro available.</p>



<a name="180779934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/180779934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#180779934">(Nov 14 2019 at 21:59)</a>:</h4>
<blockquote>
<p>Does <code>const fn</code> support <code>unimplemented!()</code>?</p>
</blockquote>
<p>No. Not yet at least.</p>



<a name="185036908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/185036908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#185036908">(Jan 07 2020 at 18:07)</a>:</h4>
<p>We are seeing so many cases of 'needs minimization' over in <a class="stream" data-stream-id="187312" href="/#narrow/stream/187312-wg-async-foundations">#wg-async-foundations</a> -- too bad we didn't set this up yet!</p>



<a name="185213163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185694-t-compiler/wg-meta/topic/reducer%20ICE-breakers/near/185213163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/185694-t-compiler/wg-meta/topic/reducer.20ICE-breakers.html#185213163">(Jan 09 2020 at 13:53)</a>:</h4>
<p>yeah we need to set this up ASAP</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>